3.15 \(\int \frac{1}{(a+b \cos (e+f x)) (c+d \sec (e+f x))^3} \, dx\)

Optimal. Leaf size=458 \[ -\frac{2 d \left (3 a^2 c^2-3 a b c d+b^2 d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^2 f \sqrt{c-d} \sqrt{c+d} (a c-b d)^3}+\frac{2 a^3 \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{a+b}}\right )}{f \sqrt{a-b} \sqrt{a+b} (a c-b d)^3}+\frac{3 d^4 \sin (e+f x)}{2 c f \left (c^2-d^2\right )^2 (a c-b d) (c \cos (e+f x)+d)}-\frac{d^3 \sin (e+f x)}{2 c f \left (c^2-d^2\right ) (a c-b d) (c \cos (e+f x)+d)^2}+\frac{d^2 (3 a c-2 b d) \sin (e+f x)}{c f \left (c^2-d^2\right ) (a c-b d)^2 (c \cos (e+f x)+d)}-\frac{d^3 \left (c^2+2 d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^2 f (c-d)^{5/2} (c+d)^{5/2} (a c-b d)}-\frac{2 d^3 (3 a c-2 b d) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^2 f (c-d)^{3/2} (c+d)^{3/2} (a c-b d)^2} \]

[Out]

(2*a^3*ArcTan[(Sqrt[a - b]*Tan[(e + f*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*Sqrt[a + b]*(a*c - b*d)^3*f) - (2*d^3*
(3*a*c - 2*b*d)*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c + d]])/(c^2*(c - d)^(3/2)*(c + d)^(3/2)*(a*c - b
*d)^2*f) - (d^3*(c^2 + 2*d^2)*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c + d]])/(c^2*(c - d)^(5/2)*(c + d)^
(5/2)*(a*c - b*d)*f) - (2*d*(3*a^2*c^2 - 3*a*b*c*d + b^2*d^2)*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c +
d]])/(c^2*Sqrt[c - d]*Sqrt[c + d]*(a*c - b*d)^3*f) - (d^3*Sin[e + f*x])/(2*c*(a*c - b*d)*(c^2 - d^2)*f*(d + c*
Cos[e + f*x])^2) + (3*d^4*Sin[e + f*x])/(2*c*(a*c - b*d)*(c^2 - d^2)^2*f*(d + c*Cos[e + f*x])) + (d^2*(3*a*c -
 2*b*d)*Sin[e + f*x])/(c*(a*c - b*d)^2*(c^2 - d^2)*f*(d + c*Cos[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.970845, antiderivative size = 458, normalized size of antiderivative = 1., number of steps used = 16, number of rules used = 8, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.32, Rules used = {2828, 2952, 2659, 205, 2664, 2754, 12, 208} \[ -\frac{2 d \left (3 a^2 c^2-3 a b c d+b^2 d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^2 f \sqrt{c-d} \sqrt{c+d} (a c-b d)^3}+\frac{2 a^3 \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{a+b}}\right )}{f \sqrt{a-b} \sqrt{a+b} (a c-b d)^3}+\frac{3 d^4 \sin (e+f x)}{2 c f \left (c^2-d^2\right )^2 (a c-b d) (c \cos (e+f x)+d)}-\frac{d^3 \sin (e+f x)}{2 c f \left (c^2-d^2\right ) (a c-b d) (c \cos (e+f x)+d)^2}+\frac{d^2 (3 a c-2 b d) \sin (e+f x)}{c f \left (c^2-d^2\right ) (a c-b d)^2 (c \cos (e+f x)+d)}-\frac{d^3 \left (c^2+2 d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^2 f (c-d)^{5/2} (c+d)^{5/2} (a c-b d)}-\frac{2 d^3 (3 a c-2 b d) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^2 f (c-d)^{3/2} (c+d)^{3/2} (a c-b d)^2} \]

Antiderivative was successfully verified.

[In]

Int[1/((a + b*Cos[e + f*x])*(c + d*Sec[e + f*x])^3),x]

[Out]

(2*a^3*ArcTan[(Sqrt[a - b]*Tan[(e + f*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*Sqrt[a + b]*(a*c - b*d)^3*f) - (2*d^3*
(3*a*c - 2*b*d)*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c + d]])/(c^2*(c - d)^(3/2)*(c + d)^(3/2)*(a*c - b
*d)^2*f) - (d^3*(c^2 + 2*d^2)*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c + d]])/(c^2*(c - d)^(5/2)*(c + d)^
(5/2)*(a*c - b*d)*f) - (2*d*(3*a^2*c^2 - 3*a*b*c*d + b^2*d^2)*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c +
d]])/(c^2*Sqrt[c - d]*Sqrt[c + d]*(a*c - b*d)^3*f) - (d^3*Sin[e + f*x])/(2*c*(a*c - b*d)*(c^2 - d^2)*f*(d + c*
Cos[e + f*x])^2) + (3*d^4*Sin[e + f*x])/(2*c*(a*c - b*d)*(c^2 - d^2)^2*f*(d + c*Cos[e + f*x])) + (d^2*(3*a*c -
 2*b*d)*Sin[e + f*x])/(c*(a*c - b*d)^2*(c^2 - d^2)*f*(d + c*Cos[e + f*x]))

Rule 2828

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> In
t[((a + b*Sin[e + f*x])^m*(d + c*Sin[e + f*x])^n)/Sin[e + f*x]^n, x] /; FreeQ[{a, b, c, d, e, f, m}, x] && Int
egerQ[n]

Rule 2952

Int[((g_.)*sin[(e_.) + (f_.)*(x_)])^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) +
 (f_.)*(x_)])^(n_), x_Symbol] :> Int[ExpandTrig[(g*sin[e + f*x])^p*(a + b*sin[e + f*x])^m*(c + d*sin[e + f*x])
^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[b*c - a*d, 0] && (IntegersQ[m, n] || IntegersQ[m, p
] || IntegersQ[n, p]) && NeQ[p, 2]

Rule 2659

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2664

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(a + b*Sin[c + d*x])^(n +
1))/(d*(n + 1)*(a^2 - b^2)), x] + Dist[1/((n + 1)*(a^2 - b^2)), Int[(a + b*Sin[c + d*x])^(n + 1)*Simp[a*(n + 1
) - b*(n + 2)*Sin[c + d*x], x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && LtQ[n, -1] && Integer
Q[2*n]

Rule 2754

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[((
b*c - a*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(f*(m + 1)*(a^2 - b^2)), x] + Dist[1/((m + 1)*(a^2 - b^2
)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[(a*c - b*d)*(m + 1) - (b*c - a*d)*(m + 2)*Sin[e + f*x], x], x], x] /
; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegerQ[2*m]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{1}{(a+b \cos (e+f x)) (c+d \sec (e+f x))^3} \, dx &=\int \frac{\cos ^3(e+f x)}{(a+b \cos (e+f x)) (d+c \cos (e+f x))^3} \, dx\\ &=\int \left (\frac{a^3}{(a c-b d)^3 (a+b \cos (e+f x))}-\frac{d^3}{c^2 (a c-b d) (d+c \cos (e+f x))^3}+\frac{d^2 (3 a c-2 b d)}{c^2 (a c-b d)^2 (d+c \cos (e+f x))^2}-\frac{d \left (3 a^2 c^2-3 a b c d+b^2 d^2\right )}{c^2 (a c-b d)^3 (d+c \cos (e+f x))}\right ) \, dx\\ &=\frac{a^3 \int \frac{1}{a+b \cos (e+f x)} \, dx}{(a c-b d)^3}+\frac{\left (d^2 (3 a c-2 b d)\right ) \int \frac{1}{(d+c \cos (e+f x))^2} \, dx}{c^2 (a c-b d)^2}-\frac{d^3 \int \frac{1}{(d+c \cos (e+f x))^3} \, dx}{c^2 (a c-b d)}-\frac{\left (d \left (3 a^2 c^2-3 a b c d+b^2 d^2\right )\right ) \int \frac{1}{d+c \cos (e+f x)} \, dx}{c^2 (a c-b d)^3}\\ &=-\frac{d^3 \sin (e+f x)}{2 c (a c-b d) \left (c^2-d^2\right ) f (d+c \cos (e+f x))^2}+\frac{d^2 (3 a c-2 b d) \sin (e+f x)}{c (a c-b d)^2 \left (c^2-d^2\right ) f (d+c \cos (e+f x))}-\frac{\left (d^2 (3 a c-2 b d)\right ) \int \frac{d}{d+c \cos (e+f x)} \, dx}{c^2 (a c-b d)^2 \left (c^2-d^2\right )}-\frac{d^3 \int \frac{-2 d+c \cos (e+f x)}{(d+c \cos (e+f x))^2} \, dx}{2 c^2 (a c-b d) \left (c^2-d^2\right )}+\frac{\left (2 a^3\right ) \operatorname{Subst}\left (\int \frac{1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac{1}{2} (e+f x)\right )\right )}{(a c-b d)^3 f}-\frac{\left (2 d \left (3 a^2 c^2-3 a b c d+b^2 d^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{c+d+(-c+d) x^2} \, dx,x,\tan \left (\frac{1}{2} (e+f x)\right )\right )}{c^2 (a c-b d)^3 f}\\ &=\frac{2 a^3 \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{a+b}}\right )}{\sqrt{a-b} \sqrt{a+b} (a c-b d)^3 f}-\frac{2 d \left (3 a^2 c^2-3 a b c d+b^2 d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^2 \sqrt{c-d} \sqrt{c+d} (a c-b d)^3 f}-\frac{d^3 \sin (e+f x)}{2 c (a c-b d) \left (c^2-d^2\right ) f (d+c \cos (e+f x))^2}+\frac{3 d^4 \sin (e+f x)}{2 c (a c-b d) \left (c^2-d^2\right )^2 f (d+c \cos (e+f x))}+\frac{d^2 (3 a c-2 b d) \sin (e+f x)}{c (a c-b d)^2 \left (c^2-d^2\right ) f (d+c \cos (e+f x))}-\frac{d^3 \int \frac{c^2+2 d^2}{d+c \cos (e+f x)} \, dx}{2 c^2 (a c-b d) \left (c^2-d^2\right )^2}-\frac{\left (d^3 (3 a c-2 b d)\right ) \int \frac{1}{d+c \cos (e+f x)} \, dx}{c^2 (a c-b d)^2 \left (c^2-d^2\right )}\\ &=\frac{2 a^3 \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{a+b}}\right )}{\sqrt{a-b} \sqrt{a+b} (a c-b d)^3 f}-\frac{2 d \left (3 a^2 c^2-3 a b c d+b^2 d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^2 \sqrt{c-d} \sqrt{c+d} (a c-b d)^3 f}-\frac{d^3 \sin (e+f x)}{2 c (a c-b d) \left (c^2-d^2\right ) f (d+c \cos (e+f x))^2}+\frac{3 d^4 \sin (e+f x)}{2 c (a c-b d) \left (c^2-d^2\right )^2 f (d+c \cos (e+f x))}+\frac{d^2 (3 a c-2 b d) \sin (e+f x)}{c (a c-b d)^2 \left (c^2-d^2\right ) f (d+c \cos (e+f x))}-\frac{\left (d^3 \left (c^2+2 d^2\right )\right ) \int \frac{1}{d+c \cos (e+f x)} \, dx}{2 c^2 (a c-b d) \left (c^2-d^2\right )^2}-\frac{\left (2 d^3 (3 a c-2 b d)\right ) \operatorname{Subst}\left (\int \frac{1}{c+d+(-c+d) x^2} \, dx,x,\tan \left (\frac{1}{2} (e+f x)\right )\right )}{c^2 (a c-b d)^2 \left (c^2-d^2\right ) f}\\ &=\frac{2 a^3 \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{a+b}}\right )}{\sqrt{a-b} \sqrt{a+b} (a c-b d)^3 f}-\frac{2 d^3 (3 a c-2 b d) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^2 (c-d)^{3/2} (c+d)^{3/2} (a c-b d)^2 f}-\frac{2 d \left (3 a^2 c^2-3 a b c d+b^2 d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^2 \sqrt{c-d} \sqrt{c+d} (a c-b d)^3 f}-\frac{d^3 \sin (e+f x)}{2 c (a c-b d) \left (c^2-d^2\right ) f (d+c \cos (e+f x))^2}+\frac{3 d^4 \sin (e+f x)}{2 c (a c-b d) \left (c^2-d^2\right )^2 f (d+c \cos (e+f x))}+\frac{d^2 (3 a c-2 b d) \sin (e+f x)}{c (a c-b d)^2 \left (c^2-d^2\right ) f (d+c \cos (e+f x))}-\frac{\left (d^3 \left (c^2+2 d^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{c+d+(-c+d) x^2} \, dx,x,\tan \left (\frac{1}{2} (e+f x)\right )\right )}{c^2 (a c-b d) \left (c^2-d^2\right )^2 f}\\ &=\frac{2 a^3 \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{a+b}}\right )}{\sqrt{a-b} \sqrt{a+b} (a c-b d)^3 f}-\frac{2 d^3 (3 a c-2 b d) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^2 (c-d)^{3/2} (c+d)^{3/2} (a c-b d)^2 f}-\frac{d^3 \left (c^2+2 d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^2 (c-d)^{5/2} (c+d)^{5/2} (a c-b d) f}-\frac{2 d \left (3 a^2 c^2-3 a b c d+b^2 d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{c^2 \sqrt{c-d} \sqrt{c+d} (a c-b d)^3 f}-\frac{d^3 \sin (e+f x)}{2 c (a c-b d) \left (c^2-d^2\right ) f (d+c \cos (e+f x))^2}+\frac{3 d^4 \sin (e+f x)}{2 c (a c-b d) \left (c^2-d^2\right )^2 f (d+c \cos (e+f x))}+\frac{d^2 (3 a c-2 b d) \sin (e+f x)}{c (a c-b d)^2 \left (c^2-d^2\right ) f (d+c \cos (e+f x))}\\ \end{align*}

Mathematica [A]  time = 2.25341, size = 319, normalized size = 0.7 \[ \frac{\sec ^3(e+f x) (c \cos (e+f x)+d) \left (\frac{2 d \left (a^2 \left (-5 c^2 d^2+6 c^4+2 d^4\right )-6 a b c^3 d+b^2 d^2 \left (2 c^2+d^2\right )\right ) (c \cos (e+f x)+d)^2 \tanh ^{-1}\left (\frac{(d-c) \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c^2-d^2}}\right )}{\left (c^2-d^2\right )^{5/2}}-\frac{4 a^3 (c \cos (e+f x)+d)^2 \tanh ^{-1}\left (\frac{(a-b) \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{b^2-a^2}}\right )}{\sqrt{b^2-a^2}}+\frac{d^2 (a c-b d) \left (6 a c^3-3 a c d^2-4 b c^2 d+b d^3\right ) \sin (e+f x) (c \cos (e+f x)+d)}{c (c-d)^2 (c+d)^2}-\frac{d^3 (a c-b d)^2 \sin (e+f x)}{c (c-d) (c+d)}\right )}{2 f (a c-b d)^3 (c+d \sec (e+f x))^3} \]

Antiderivative was successfully verified.

[In]

Integrate[1/((a + b*Cos[e + f*x])*(c + d*Sec[e + f*x])^3),x]

[Out]

((d + c*Cos[e + f*x])*Sec[e + f*x]^3*((-4*a^3*ArcTanh[((a - b)*Tan[(e + f*x)/2])/Sqrt[-a^2 + b^2]]*(d + c*Cos[
e + f*x])^2)/Sqrt[-a^2 + b^2] + (2*d*(-6*a*b*c^3*d + b^2*d^2*(2*c^2 + d^2) + a^2*(6*c^4 - 5*c^2*d^2 + 2*d^4))*
ArcTanh[((-c + d)*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]]*(d + c*Cos[e + f*x])^2)/(c^2 - d^2)^(5/2) - (d^3*(a*c - b
*d)^2*Sin[e + f*x])/(c*(c - d)*(c + d)) + (d^2*(a*c - b*d)*(6*a*c^3 - 4*b*c^2*d - 3*a*c*d^2 + b*d^3)*(d + c*Co
s[e + f*x])*Sin[e + f*x])/(c*(c - d)^2*(c + d)^2)))/(2*(a*c - b*d)^3*f*(c + d*Sec[e + f*x])^3)

________________________________________________________________________________________

Maple [B]  time = 0.092, size = 1869, normalized size = 4.1 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e))^3,x)

[Out]

-6/f*d^2/(a*c-b*d)^3/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2/(c-d)/(c^2+2*c*d+d^2)*tan(1/2*f*x+1
/2*e)^3*a^2*c^3-1/f*d^3/(a*c-b*d)^3/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2/(c-d)/(c^2+2*c*d+d^2
)*tan(1/2*f*x+1/2*e)^3*a^2*c^2+2/f*d^4/(a*c-b*d)^3/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2/(c-d)
/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)^3*a^2*c+10/f*d^3/(a*c-b*d)^3/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*
d-c-d)^2/(c-d)/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)^3*a*b*c^2+2/f*d^4/(a*c-b*d)^3/(tan(1/2*f*x+1/2*e)^2*c-tan(1/
2*f*x+1/2*e)^2*d-c-d)^2/(c-d)/(c^2+2*c*d+d^2)*tan(1/2*f*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ta
n(1/2*f*x+1/2*e)*a*b+4/f*d^4/(a*c-b*d)^3/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2/(c+d)/(c-d)^2*t
an(1/2*f*x+1/2*e)*b^2*c-1/f*d^5/(a*c-b*d)^3/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2/(c+d)/(c-d)^
2*tan(1/2*f*x+1/2*e)*b^2-6/f*d/(a*c-b*d)^3/(c^4-2*c^2*d^2+d^4)/((c+d)*(c-d))^(1/2)*arctanh((c-d)*tan(1/2*f*x+1
/2*e)/((c+d)*(c-d))^(1/2))*a^2*c^4+5/f*d^3/(a*c-b*d)^3/(c^4-2*c^2*d^2+d^4)/((c+d)*(c-d))^(1/2)*arctanh((c-d)*t
an(1/2*f*x+1/2*e)/((c+d)*(c-d))^(1/2))*a^2*c^2-2/f*d^5/(a*c-b*d)^3/(c^4-2*c^2*d^2+d^4)/((c+d)*(c-d))^(1/2)*arc
tanh((c-d)*tan(1/2*f*x+1/2*e)/((c+d)*(c-d))^(1/2))*a^2+6/f*d^2/(a*c-b*d)^3/(c^4-2*c^2*d^2+d^4)/((c+d)*(c-d))^(
1/2)*arctanh((c-d)*tan(1/2*f*x+1/2*e)/((c+d)*(c-d))^(1/2))*a*b*c^3-2/f*d^3/(a*c-b*d)^3/(c^4-2*c^2*d^2+d^4)/((c
+d)*(c-d))^(1/2)*arctanh((c-d)*tan(1/2*f*x+1/2*e)/((c+d)*(c-d))^(1/2))*b^2*c^2-1/f*d^5/(a*c-b*d)^3/(c^4-2*c^2*
d^2+d^4)/((c+d)*(c-d))^(1/2)*arctanh((c-d)*tan(1/2*f*x+1/2*e)/((c+d)*(c-d))^(1/2))*b^2+2/f*a^3/(a*c-b*d)^3/((a
+b)*(a-b))^(1/2)*arctan((a-b)*tan(1/2*f*x+1/2*e)/((a+b)*(a-b))^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e))^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e))^3,x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e))**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.72103, size = 1040, normalized size = 2.27 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e))^3,x, algorithm="giac")

[Out]

(2*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(2*a - 2*b) + arctan((a*tan(1/2*f*x + 1/2*e) - b*tan(1/2*f*x + 1/2*e))
/sqrt(a^2 - b^2)))*a^3/((a^3*c^3 - 3*a^2*b*c^2*d + 3*a*b^2*c*d^2 - b^3*d^3)*sqrt(a^2 - b^2)) + (6*a^2*c^4*d -
6*a*b*c^3*d^2 - 5*a^2*c^2*d^3 + 2*b^2*c^2*d^3 + 2*a^2*d^5 + b^2*d^5)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(2*c
 - 2*d) + arctan((c*tan(1/2*f*x + 1/2*e) - d*tan(1/2*f*x + 1/2*e))/sqrt(-c^2 + d^2)))/((a^3*c^7 - 3*a^2*b*c^6*
d - 2*a^3*c^5*d^2 + 3*a*b^2*c^5*d^2 + 6*a^2*b*c^4*d^3 - b^3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